<?php
/*
Plugin Name: Category
Plugin URI: http://www.yhustc.com/
Description: 日志分类
Author: yhustc
Version: 1.0
Author URI: http://www.yhustc.com/
*/

class CategoryWidget extends Widget
{
	function render($data=array())
	{
		$categories = S("categories");
		if(!$categories)
		{
			$Dao = D("Category");
			$categories = $Dao->order("cid ASC")->findAll();
			S("categories",$categories);
		}
		
		$this->assign("categories",$categories);
		return $this->renderFile();
	}
}
?>